$(document).ready(function(){
           $("#createuser").validate({             
      		rules: {
      			menocreate: {
      				required: true,
      				minlength: 2,
					maxlength: 20
      			},
      			priezviskocreate: {                  
      				required: true,         
      				minlength: 2,
					maxlength: 20		
      			},
      			heslocreate: {
					required: true,         
      				minlength: 5,
      				maxlength: 20
      			},
				zheslocreate: {
					required: true,         
      				minlength: 5,
      				maxlength: 20,
					equalTo: "#heslocreate"
      			}						
      		},
      		messages: {
      			menocreate: {
      				required: "Zadajte meno.",
      				minlength: "Meno musi mať min. 2 znaky.",
					maxlength: "Meno musi mať max. 20 znakov."
      			},
      			priezviskocreate: {
      				required: "Zadajte priezvisko.",
      				minlength: "Priezvisko musi mať min. 2 znaky.",
					maxlength: "Priezvisko musi mať max. 20 znakov."
      			},
      			heslocreate: {
      				required: "Zadajte heslo.",
      				minlength: "Heslo musi mať min. 5 znakov.",
      				maxlength: "Heslo musi mať max. 20 znakov."
      			},
				zheslocreate: {
    				required: "Zadajte heslo.",
      				minlength: "Heslo musi mať min. 5 znakov.",
      				maxlength: "Heslo musi mať max. 20 znakov.",
					equalTo: "Heslá sa nezhodujú."
      			},
      			agree: ""
      		}
		});
		
		
		
		
	});